<div id="ng-app" ng-controller="MainController">
    <div class="table-header mt20 clearfix">
        <span class="fl lh30 f14">360°全景相册列表</span>
        <div class="fr btn-group">
            <a class="btn permission p-50040204-02-block" href="javascript: void(0)" 
               ui-dialog="新增360°全景相册"
               ui-dialog-cache="false"
               url="album360-edit.html"
               data="panorama.convertRecord()"
               ok="panorama.save($data)">新增</a>
        </div>
    </div>
    <div id="grid" class="table-wrap mt10">
        <table width="100%">
            <thead>
            <tr>
                <th style="width: 80px;">
                    序号
                </th>
                <th>名称</th>
                <th style="width: 100px;">顺序</th>
                <th style="width: 100px;">相册类型</th>
                <th>描述信息</th>
                <th style="width: 80px;">操作</th>
            </tr>
            </thead>
            <tbody>
                <tr ng-repeat="record in panorama.data"
                    ng-mouseover="record.hover = true"
                    ng-mouseleave="record.hover = false">
                    <td height="40" ng-bind="((panorama.pageIndex - 1) * panorama.pageSize) + $index + 1"></td>
                    <td>
                        <p ng-bind="record.name"></p>
                    </td>
                    <td>
                        <p ng-bind="record.taxis"></p>
                    </td>
                    <td>
                        <p class="ng-hide" ng-show="record.type == '0'">图片</p>
                        <p class="ng-hide" ng-show="record.type == '1'">资源包</p>
                        <p class="ng-hide" ng-show="record.type == '2'">资源地址</p>
                    </td>
                    <td>
                        <p ng-bind="record.intro"></p>
                    </td>
                    <td>
                        <p class="ng-hide" ng-show="record.hover">
                            <a class="c-orange permission p-50040204-02-inline" href="javascript: void(0)" 
                               ui-dialog="编辑360°全景相册"
                               ui-dialog-cache="false"
                               url="album360-edit.html"
                               data="panorama.convertRecord(record)"
                               ok="panorama.save($data)">编辑</a>
                            &nbsp;&nbsp;
                            <a href="javascript: void(0)" class="c-orange permission p-50040204-03-inline"
                               ui-confirm="删除全景相册将关联删除相关数据，是否确认删除？"
                               ui-confirm-ok="panorama.remove(record)">删除</a>
                        </p>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="no-data ng-hide" ng-show="!!panorama.data && !panorama.data.length"><span>暂无数据</span></div>
    </div>
    <div ui-pagination page-index="panorama.pageIndex" page-size="panorama.pageSize" total="panorama.total" changed="panorama.query($pageIndex)"></div>
</div>
<script type="text/javascript">
    seajs.use(['service/o2o_application/panorama/index']);
</script>
